package com.example.simple.dialog

import android.content.Context
import android.view.View
import com.blankj.utilcode.util.ActivityUtils
import com.example.app.R
import com.example.app.base.BaseAttachDialog
import com.example.app.databinding.AppStateViewEmptyBinding
import com.lxj.xpopup.XPopup

/**
 * Description: 自定义自由定位Position弹窗
 */
class SimpleAttachDialog(context: Context) : BaseAttachDialog<AppStateViewEmptyBinding>(context) {
    override fun getViewBinding() = AppStateViewEmptyBinding.bind(popupImplView)
    override fun getImplLayoutId() = R.layout.app_state_view_empty

    companion object {
        fun show(view: View): SimpleAttachDialog {
            val context = ActivityUtils.getTopActivity()
            val dialog = SimpleAttachDialog(context).apply {

            }
            XPopup.Builder(context)
                .isDestroyOnDismiss(true)
                .hasShadowBg(false)
                .atView(view)
                .asCustom(dialog)
                .show()
            return dialog
        }
    }

    override fun onCreate() {
        super.onCreate()
        mViewBinding?.apply {

        }
    }
}